#include<bits/stdc++.h>
using namespace std;
int main()
{
	int i,j,n,m,square=0,rect=0;
	cin>>n>>m;
	square+=n*m;
	for(i=2;i<n;i++)
	{
		square+=ceil(n*m*1.0/i);
	}
	if(n==m) square++;
	cout<<square;
    return 0;
}

